//
//  UIFont+Util.m
//  ioWiz
//
//  Created by chongyang on 2023/2/9.
//

#import "UIFont+Util.h"

@implementation UIFont (Util)
// 项目中使用的字体库
/// family name : Poppins
/// - Poppins-Regular // 常规体
/// - Poppins-ExtraLight // 加粗体
/// - Poppins-Light // 细体
/// - Poppins-Medium //  中黑体
/// - Poppins-SemiBold // 中粗体
/// - Poppins-Bold // 粗体
/// - Poppins-Black // 黑体
///
///
+ (UIFont *)fontWithPoppinsFamilyWithName:(PoppinsFamily)name size:(CGFloat)fontSize {
    NSString *fontName = @"";
    switch (name) {
        case Poppins_Bold:
            fontName = @"Poppins-Bold";
            break;
        case Poppins_Black:
            fontName = @"Poppins-Black";
            break;
        case Poppins_SemiBold:
            fontName = @"Poppins-SemiBold";
            break;
        case Poppins_Medium:
            fontName = @"Poppins-Medium";
            break;
        case Poppins_Light:
            fontName = @"Poppins-Light";
            break;
        case Poppins_ExtraLight:
            fontName = @"Poppins-ExtraLight";
            break;
        case Poppins_Regular:
            fontName = @"Poppins-Regular";
            break;
        default:
            break;
    }
    
    
    return [UIFont fontWithName:fontName size:fontSize];
}
@end
